{{- if and (not (.Values.global.enabledModules | has "user-authn")) .Values.global.clusterIsBootstrapped }}
---
apiVersion: v1
kind: Secret
metadata:
  name: hubble-basic-auth
  namespace: d8-cni-cilium
  {{- include "helm_lib_module_labels" (list . (dict "app" "hubble-ui")) | nindent 2 }}
type: Opaque
data:
  auth: {{ print "admin:{PLAIN}" .Values.ciliumHubble.internal.auth.password | b64enc | quote }}
{{- end }}
---
apiVersion: v1
kind: Secret
metadata:
  name: hubble-ui-client-certs
  namespace: d8-cni-cilium
        {{- include "helm_lib_module_labels" (list . (dict "app" "hubble-ui")) | nindent 2 }}
type: kubernetes.io/tls
data:
  ca.crt:  {{ $.Values.ciliumHubble.internal.ui.ca | b64enc }}
  tls.crt: {{ $.Values.ciliumHubble.internal.ui.cert | b64enc }}
  tls.key: {{ $.Values.ciliumHubble.internal.ui.key  | b64enc }}
